package cn.wzy.controller;



import cn.wzy.annotation.AnPermission;
import cn.wzy.pojo.CarOnlineAuditLog;
import cn.wzy.results.ResponseResult;
import cn.wzy.service.CarOnlineAuditLogService;
import cn.wzy.vo.GoPageVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.annotation.TableName;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * (CarOnlineAuditLog)表控制层
 *
 * @author makejava
 * @since 2023-01-24 10:49:09
 */
@RestController
@RequestMapping("carOnlineAuditLog")
@ApiOperation(value = "车辆消息管理")
@AnPermission(name = "车辆消息管理")
public class CarOnlineAuditLogController{
    /**
     * 服务对象
     */
    @Resource
    private CarOnlineAuditLogService carOnlineAuditLogService;
    
    /*
    * 查询分页
    * */
    @PostMapping("/page")
    @ApiOperation(value = "车辆消息管理分页查询",tags = "分页")
    @AnPermission(name = "车辆消息管理分页查询")
    public ResponseResult getCarOnlineAuditLogPage(@RequestBody GoPageVo goPageVo){
        return carOnlineAuditLogService.getCarOnlineAuditLogPage(goPageVo);
    }

    /*
    * 查询
    * */
    @GetMapping("/{id}")
    @AnPermission(name = "车辆消息管理id查询")
    @ApiOperation(value = "车辆消息管理id查询")
    public ResponseResult getCarOnlineAuditLog(@PathVariable("id") Long id){
        return carOnlineAuditLogService.getCarOnlineAuditLog(id);
    }

    /*
    * 新增和修改
    * */
    @PostMapping
    @AnPermission(name = "车辆消息修改或者添加")
    @ApiOperation(value = "车辆消息新增或者修改")
    public ResponseResult saveCarOnlineAuditLog(@RequestBody CarOnlineAuditLog carOnlineAuditLog){
        return carOnlineAuditLogService.saveCarOnlineAuditLog(carOnlineAuditLog);
    }

    /*
    * 删除
    * */
    @DeleteMapping("/{id}")
    @AnPermission(name = "id删除车辆消息")
    @ApiOperation(value = "删除车辆消息")
    public ResponseResult deleteCarOnlineAuditLog(@PathVariable("id") Long id){
        return carOnlineAuditLogService.deleteCarOnlineAuditLog(id);
    }


    /*
    * 批量删除
    * */
    @PatchMapping
    @AnPermission(name = "批量删除车辆消息")
    @ApiOperation(value = "批量删除车辆消息")
    public ResponseResult deleteCarOnlineAuditLogList(@RequestBody List<Long> ids){
        return carOnlineAuditLogService.deleteCarOnlineAuditLogList(ids);
    }



}

